EMT Practice Test

1. Question Content...


Question List

Question1: Wha is the purpose of Docker Content Trust?

Question2: During development of an application meant to be orchestrated by Kubernetes, you want to mount the /data directory on your laptop into a container.
Will this strategy successfully accomplish this?
Solution: Create a PersistentVolume with storageciass: "" and hostPath: /data, and a persistentVolumeClaim requesting this PV. Then use that PVC to populate a volume in a pod

Question3: When an application being managed by UCP fails, you would like a summary of all requests made to the UCP API in the hours leading up to the failure.
What must be configured correctly beforehand for this to be possible?

Question4: Which of the following are types of namespaces used by Docker to provide isolation? (Choose 2.)

Question5: Which of the following commands will create a swarm service which only listens on port 53 using the UDP protocol?

Question6: What is the docker command to find the current logging driver for a running container?

Question7: Your organization has a centralized logging solution, such as Splunk.
Will this configure a Docker container to export container logs to the logging solution?
Solution: Set the log-driver and log-oPt keys to values for the logging solution (Splunk) In the daemon.json file.

Question8: Seven managers are in a swarm cluster.
Is this how should they be distributed across three datacenters or availability zones?
Solution: 5-1-1

Question9: You are troubleshooting a Kubernetes deployment called api, and want to see the events table for this object. Does this command display it?
Solution: kubectl logs deployment api

Question10: A server is running low on disk space. What command can be used to check the disk usage of images, containers, and volumes for Docker engine?

Question11: Which of the following is true about overlay networks?

Question12: Seven managers are in a swarm cluster.
Is this how should they be distributed across three datacenters or availability zones?
Solution: 3-2-2

Question13: What is used by the kernel to Isolate resources when running Docker containers?

Question14: You want to create a container that is reachable from its host's network. Does this action accomplish this?
Solution: Use --link to access the container on the bridge network.

Question15: You have just executed 'docker swarm leave' on a node. What command can be run on the same node to confirm it has left the cluster?

Question16: After creating a new service named 'http', you notice that the new service is not registering as healthy. How do you view the list of historical tasks for that service by using the command line?

Question17: During development of an application meant to be orchestrated by Kubernetes, you want to mount the /data directory on your laptop into a container.
Will this strategy successfully accomplish this?
Solution: Add a volume to the pod that sets hostPath.path: /data, and then mount this volume into the pod's containers as desired.

Question18: Will this Linux kernel facility limit a Docker container's access to host resources, such as CPU or memory?
Solution: cgroups

Question19: After creating a new service named 'http', you notice that the new service is not registering as healthy. How do
you view the list of historical tasks for that service by using the command line?

Question20: Will this command display a list of volumes for a specific container?
Solution: docker container logs nginx --volumes'

Question21: In the context of a swarm mode cluster, does this describe a node?
Solution: a virtual machine participating in the swarm

Question22: Which statement is true?

Question23: Which command interactively monitors all container activity in the Docker engine?

Question24: You want to provide a configuration file to a container at runtime. Does this set of Kubernetes tools and steps accomplish this?
Solution: Turn the configuration file into a configMap object, use it to populate a volume associated with the pod, and mount that file from the volume to the appropriate container and path.

Question25: The following health check exists in a Dockerfile:
'HEALTCHECK CMD curl --fail http://localhost/health || exit 1'
Which of the following describes its purpose?

Question26: You created a new service named 'http' and discover it is not registering as healthy. Will this command enable you to view the list of historical tasks for this service?
Solution: 'docker service ps http'

Question27: In Docker Trusted Registry, how would a user prevent an image, for example 'nginx:latest' from being
overwritten by another user with push access to the repository?

Question28: Is this an advantage of multi-stage builds?
Solution: better caching when building Docker images

Question29: Which of the following is NOT backed up when performing a Docker Trusted backup operation?

Question30: A users attempts to set the system time from inside a Docker container are unsuccessful. Could this be blocking this operation?
Solution: Linux capabilities

Question31: Which statement is correct about cluster management in Docker Enterprise Edition 3.x?

Question32: A user is having problems running Docker. Which of the following will start Docker in debug mode?

Question33: You want to mount external storage to a particular filesystem path in a container in a Kubernetes pod. What is the correct set of objects to use for this?

Question34: In Docker Trusted Registry, how would a user prevent an image, for example 'nginx:latest' from being overwritten by another user with push access to the repository?

Question35: How do you configure Docker engine to use a registry that is not configured with TLS certificates from a trusted CA?

Question36: Which one of the following commands will result in the volume being removed automatically once the container has exited?

Question37: A company's security policy specifies that development and production containers must run on separate nodes in a given Swarm cluster.
Can this be used to schedule containers to meet the security policy requirements?
Solution: node taints

Question38: Is this a type of Linux kernel namespace that provides container isolation?
Solution: Network

Question39: Will this command mount the host's '/data' directory to the ubuntu container in read-only mode?
Solution: 'docker run --add-volume /data /mydata -read-only ubuntu'

Question40: A docker service 'web' is running with a scale factor of 1 (replicas = 1).
Bob intends to use the command 'docker service update --replicas=3 web'.
Alice intends to use the command 'docker service scale web=3'.
How do the outcomes oft these two commands differ?

Question41: Will this command ensure that overlay traffic between service tasks is encrypted?
Solution: docker service create --network --encrypted

Question42: Is this the purpose of Docker Content Trust?
Solution: Enable mutual TLS between the Docker client and server.

Question43: A company's security policy specifies that development and production containers must run on separate nodes in a given Swarm cluster.
Can this be used to schedule containers to meet the security policy requirements?
Solution: label contraints

Question44: Does this command create a swarm service that only listens on port 53 using the UDP protocol?
Solution: 'docker service create -name dns-cache -p 53:53 -service udp dns-cache'

Question45: Is this a Linux kernel namespace that is disabled by default and must be enabled at Docker engine runtime to be used?
Solution: net

Question46: Is this statement correct?
Solution: A Dockerfile provides instructions for building a Docker image

Question47: What is the difference between a resource limit and a resource reservation when scheduling services?

Question48: Two development teams in your organization use Kubernetes and want to deploy their applications while ensuring that Kubernetes-specific resources, such as secrets, are grouped together for each application.
Is this a way to accomplish this?
Solution: Add all the resources to the default namespace.

Question49: Will this Linux kernel facility limit a Docker container's access to host resources, such as CPU or memory?
Solution: seccomp

Question50: Can this set of commands identify the published port(s) for a container?
Solution: docker container inspect', 'docker port'

Question51: You want to create a container that is reachable from its host's network. Does this action accomplish this?
Solution: Use network attach to access the containers on the bridge network

Question52: Will this configuration achieve fault tolerance for managers in a swarm?
Solution: an odd number of manager nodes, totaling more than two

Question53: Will this Linux kernel facility limit a Docker container's access to host resources, such as CPU or memory?
Solution: namespaces

Question54: The Kubernetes yaml shown below describes a clusterIP service.

Is this a correct statement about how this service routes requests?
Solution: Traffic sent to the IP of this service on port 8080 will be routed to port 80 in a random pod with the label aPP: nginx.

Question55: You have deployed a service to swarm. Which command uses the Docker CLI to set the number of tasks of the services to 5? (choose 2)

Question56: You add a new user to the engineering organization in DTR.
Will this action grant them read/write access to the engineering/api repository?
Solution: Add the user directly to the list of users with read/write access under the repository's Permissions tab.

Question57: One of several containers in a pod is marked as unhealthy after failing its livenessProbe many times. Is this the action taken by the orchestrator to fix the unhealthy container?
Solution: The unhealthy container is restarted.

Question58: Your organization has a centralized logging solution, such as Splunk.
Will this configure a Docker container to export container logs to the logging solution?
Solution: docker system events --filter splunk

Question59: A Kubernetes node is allocated a /26 CIDR block (64 unique IPs) for its address space.
If every pod on this node has exactly two containers in it, how many pods can this address space support on this node?

Question60: When seven managers are in a swarm cluster how would they be distributed across three datacenters or availability zones?

Question61: An application image runs in multiple environments, and each environment uses different certificates and ports, what is the best practice to deploy the containers?